package com.yyy.lambda;


import java.util.function.Function;
import java.util.function.Supplier;

/**
 * 测试静态方法的引用lambda表达式
 *
 *
 * 问题:  String::toUpperCase 非静态方法为啥能执行
 */
public class TestStaticMethod {

    public static void main(String[] args) {
        Supplier<String> stringSupplier = TestStaticMethod::get;
        System.out.println(TestStaticMethod.get());

        Function<String, String> f2 = String::toUpperCase;
        System.out.println(f2.apply("hello"));
    }

    static String get() {
        return "获取静态方法的数据";
    }
}
